﻿Public Class ServerMessagesControl
    Dim ServerMessages() As MPQService.ServerMessage

    Dim [Continue] As Boolean = False

    Public Sub New(ByVal Messages() As MPQService.ServerMessage)
        InitializeComponent()
        ServerMessages = Messages
    End Sub

    Private Sub ServerMessagesControl_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        For Each item As MPQService.ServerMessage In ServerMessages
            FlowLayoutPanel.Controls.Add(New ServerMessage(item))
        Next
    End Sub

    Private Sub ContinueButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ContinueButton.Click
        [Continue] = True
    End Sub

    Sub WaitForContinue()
        Do Until [Continue] = True Or IsDisposed = True
            System.Threading.Thread.Sleep(100)
        Loop
    End Sub
End Class
